package com.merelyb.data.service.service.mybatis.dao.affpay;

import com.merelyb.data.service.common.MultiDataSourceContextHolder;
import com.merelyb.data.service.service.mybatis.bean.affpay.AffpayPaymentFrequency;
import com.merelyb.data.service.service.mybatis.dao.base.BaseDao;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by LiM on 2017/12/16.
 */
@Service
public class AffpayPaymentFrequencyDao extends BaseDao {

    /**
     * 获取所有周期类型
     * @param affpayPaymentFrequency
     * @param sDataBase
     * @return
     * @throws Exception
     */
    public List<String> getAllPayCommissionType(AffpayPaymentFrequency affpayPaymentFrequency, String sDataBase) throws Exception{
        MultiDataSourceContextHolder.setDataSourceType(sDataBase);
        return this.sqlSession.selectList(AffpayPaymentFrequency.class.getName() + ".getAffpayFre", affpayPaymentFrequency);
    }
}
